package universe;

import java.util.ArrayList;

public class Utils {
	
	public static final int BOARD_WIDTH = 20;
	public static final int BOARD_HEIGHT = 40;
	
	public static final int BLOCK_WIDTH = 4;
	public static final int BLOCK_HEIGHT = 4;
	
	public static int TIMER_MS = 500;

	
	public static ArrayList<int[][]> getBlockA(){
		
		ArrayList<int[][]> blockA = new ArrayList<int[][]>();
		int[][] pos0 = {{0,2,0,0},{0,2,2,0},{0,0,2,0},{0,0,0,0}};
		int[][] pos1 = {{0,0,0,0},{0,0,2,2},{0,2,2,0},{0,0,0,0}};
		int[][] pos2 = {{0,2,0,0},{0,2,2,0},{0,0,2,0},{0,0,0,0}};
		int[][] pos3 = {{0,0,0,0},{0,0,2,2},{0,2,2,0},{0,0,0,0}};
		blockA.add(pos0);
		blockA.add(pos1);
		blockA.add(pos2);
		blockA.add(pos3);
		return blockA;
	}
	
	
	public static ArrayList<int[][]> getBlockB(){
		
		ArrayList<int[][]> blockB = new ArrayList<int[][]>();
		int[][] pos0 = {{0,3,3,0},{0,3,3,0},{0,0,0,0},{0,0,0,0}};
		//int[][] pos1 = {{0,3,3,0},{0,3,3,0},{0,0,0,0},{0,0,0,0}};
		//int[][] pos2 = {{0,3,3,0},{0,3,3,0},{0,0,0,0},{0,0,0,0}};
		//int[][] pos3 = {{0,3,3,0},{0,3,3,0},{0,0,0,0},{0,0,0,0}};
		blockB.add(pos0);
		blockB.add(pos0);
		blockB.add(pos0);
		blockB.add(pos0);
		return blockB;
	}
	
	public static ArrayList<int[][]> getBlockC(){
		
		ArrayList<int[][]> blockC = new ArrayList<int[][]>();
		int[][] pos0 = {{4,0,0,0},{4,0,0,0},{4,0,0,0},{4,0,0,0}};
		int[][] pos1 = {{4,4,4,4},{0,0,0,0},{0,0,0,0},{0,0,0,0}};
		//int[][] pos2 = {{4,0,0,0},{4,0,0,0},{4,0,0,0},{4,0,0,0}};
		//int[][] pos3 = {{4,4,4,4},{0,0,0,0},{0,0,0,0},{0,0,0,0}};
		blockC.add(pos0);
		blockC.add(pos1);
		blockC.add(pos0);
		blockC.add(pos1);
		return blockC;
	}	
	
	public static ArrayList<int[][]> getBlockD(){
		
		ArrayList<int[][]> blockD = new ArrayList<int[][]>();
		int[][] pos0 = {{0,0,5,0},{0,5,5,0},{0,5,0,0},{0,0,0,0}};
		int[][] pos1 = {{0,0,0,0},{0,5,5,0},{0,0,5,5},{0,0,0,0}};
		int[][] pos2 = {{0,0,5,0},{0,5,5,0},{0,5,0,0},{0,0,0,0}};
		int[][] pos3 = {{0,0,0,0},{0,5,5,0},{0,0,5,5},{0,0,0,0}};
		blockD.add(pos0);
		blockD.add(pos1);
		blockD.add(pos2);
		blockD.add(pos3);
		return blockD;
	}	
	
	// Piece T :
	public static ArrayList<int[][]> getBlockE(){
		
		ArrayList<int[][]> blockE = new ArrayList<int[][]>();
//		int[][] pos0 = {{0,6,0,0},{0,6,6,0},{0,6,0,0},{0,0,0,0}};
//		int[][] pos1 = {{0,0,0,0},{0,0,6,0},{0,6,6,6},{0,0,0,0}};
//		int[][] pos2 = {{0,0,0,6},{0,0,6,6},{0,0,0,6},{0,0,0,0}};
//		int[][] pos3 = {{0,6,6,6},{0,0,6,0},{0,0,0,0},{0,0,0,0}};
		
		
		int[][] pos0 = {{0,6,0,0},{0,6,6,0},{0,6,0,0},{0,0,0,0}};
		int[][] pos1 = {{0,6,6,6},{0,0,6,0},{0,0,0,0},{0,0,0,0}};
		int[][] pos2 = {{0,0,6,0},{0,6,6,0},{0,0,6,0},{0,0,0,0}};
		int[][] pos3 = {{0,0,0,0},{0,0,6,0},{0,6,6,6},{0,0,0,0}};
		
		
		blockE.add(pos0);
		blockE.add(pos1);
		blockE.add(pos2);
		blockE.add(pos3);
		return blockE;
	}	
	
	public static ArrayList<int[][]> getBlockF(){
		
		ArrayList<int[][]> blockF = new ArrayList<int[][]>();
		int[][] pos0 = {{0,0,7,0},{0,0,7,0},{0,7,7,0},{0,0,0,0}};
		int[][] pos1 = {{0,0,0,0},{0,7,7,7},{0,0,0,7},{0,0,0,0}};
		int[][] pos2 = {{0,7,7,0},{0,7,0,0},{0,7,0,0},{0,0,0,0}};
		int[][] pos3 = {{0,0,0,0},{0,7,0,0},{0,7,7,7},{0,0,0,0}};
		blockF.add(pos0);
		blockF.add(pos1);
		blockF.add(pos2);
		blockF.add(pos3);
		return blockF;
	}	
	
	public static ArrayList<int[][]> getBlockG(){
		
		ArrayList<int[][]> blockG = new ArrayList<int[][]>();
		int[][] pos0 = {{0,8,0,0},{0,8,0,0},{0,8,8,0},{0,0,0,0}};
		int[][] pos1 = {{0,0,0,0},{0,0,0,8},{0,8,8,8},{0,0,0,0}};
		int[][] pos2 = {{0,8,8,0},{0,0,8,0},{0,0,8,0},{0,0,0,0}};
		int[][] pos3 = {{0,0,0,0},{0,8,8,8},{0,8,0,0},{0,0,0,0}};
		blockG.add(pos0);
		blockG.add(pos1);
		blockG.add(pos2);
		blockG.add(pos3);
		return blockG;
	}
                                    
}
